package thread;

/**
 * @author: 成金乘
 * @date: 2022/11/29 19:04
 * @description:
 */
//实现 Runnable, 重写 run
class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("hello");
    }
}
public class ThreadDemo2 {
    public static void main(String[] args) {
        Runnable r = new MyRunnable();//Runnable描述线程任务

        Thread t = new Thread(r);
        t.start();
    }
}
